package com.me.helper;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Preferences;

public class PreferencesData {

	private static  String PREFS_NAME = "dataGameKidMemoQuiz";
	private static	String CATEGORY = "category"; 
	private static  String LEVEL = "level";
	private static  String COUNTCLICKED = "iclicked";
	private static  String BOOL_REMEMBERSOUND = "rememberSound";
	public static Preferences prefs = Gdx.app.getPreferences(PREFS_NAME);
	
	public static void setHighScore(int iScore, int range){
		prefs.putInteger("HIGH_SCORE" +range, iScore);
		prefs.flush();
	}
	
	public static int getHighScore(int range){
		return prefs.getInteger("HIGH_SCORE" + range,10000);
	}
	
	public static void setCategory(int icategory){
		prefs.putInteger(CATEGORY, icategory);
		prefs.flush();
	}
	
	public static int getCategory(){
		return prefs.getInteger(CATEGORY,1);
	}
	
	public static void setLevel(int level){
		prefs.putInteger(LEVEL, level);
		prefs.flush();
	}
	
	public static int getLevel(){
		return prefs.getInteger(LEVEL, 1);
	}
	
	public static void setCountClicked(int iclicked){
		prefs.putInteger(COUNTCLICKED, iclicked);
		prefs.flush();
	}
	
	public static int getCountClicked(){
		return prefs.getInteger(COUNTCLICKED, 0);
	}
	
	public static void setBoolRememberSound(Boolean bRememSound){
		prefs.putBoolean(BOOL_REMEMBERSOUND, bRememSound);
		prefs.flush();
	}
	
	public static Boolean getBoolRememberSound(){
		return prefs.getBoolean(BOOL_REMEMBERSOUND, true);
	}
	
}
